package com.xg.controller;

import com.xg.pojo.UserVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by chopin on 2017/11/17.
 */
@Controller
@RequestMapping("/user/")
public class LoginController {

    private static final Logger logger = LoggerFactory.getLogger(LoginController.class);

    @RequestMapping("login")
    public ModelAndView login(UserVo user){
        logger.debug("login,{},{}",user.getUserName(),user.getPassword());
        ModelAndView mav = new ModelAndView("main");
        mav.addObject("user",user);
        return mav;
    }
}
